function go(urlM){
	$("#mainContainer").load(urlM,function(){
		window.scroll(0,0);
		$("#menu").height($("#mainContainer").height());
	});
}

function clean(){
	$("#mainContainer").html("Bienvenido");
}

function showDiv(id){
	for(var i = 1; i < 15;i++){
		$("#div" + i).hide();
		$("#text" + i).css("color","#580000");
	}

	$("#text" + id).css("color","orange");
	$("#div" + id).show();
}

function empty(id){
	return $("#" + id).val() == "" || $("#" + id).val() == null; 
}

function loadCities(idProvince,selectid){
	locationFacade.findCitiesByProvince(idProvince,function(data){
		dwr.util.removeAllOptions(selectid);
		dwr.util.addOptions(selectid, data, "id", "name");
	});
}

function deleteEntity(url){
	if(confirm(confirmDelete)){
		commonFacade.forwardToString(url,
			function(data){
				$("#mainContainer").html(data);
			});
	}
}

function download(url){
	$("#downloadIframe").attr("src",url); 
}

/*************************VALIDACION*******************************/

/***********************FIN VALIDACION*****************************/


/************************EMAIL******************************/
function advicedNotification(id){
	mailFacade.notifyNewAdviced(id, function(message){
		alert(message);
	});
}